package org.wordpress.android;

import android.app.Application;

public class WordpressAdminApplication extends Application {

    // private final class WordpressServiceConnection implements ServiceConnection {
    // private WordpressService wordpressService;
    //
    // public WordpressService getWordpressService() {
    // return this.wordpressService;
    // }
    //
    // @Override
    // public void onServiceConnected(ComponentName name, IBinder service) {
    // Toast.makeText(WordpressAdminApplication.this, "Service connected", Toast.LENGTH_LONG).show();
    // // m_service = IService.Stub.asInterface(service);
    // this.wordpressService = ((WordpressService.LocalBinder) service).getService();
    // }
    //
    // @Override
    // public void onServiceDisconnected(ComponentName name) {
    // Toast.makeText(WordpressAdminApplication.this, "Service disconnected", Toast.LENGTH_LONG).show();
    // }
    // }
    //
    // private WordpressServiceConnection serviceConnection = new WordpressServiceConnection();

    @Override
    public void onCreate() {
        super.onCreate();
        // // Toast.makeText(WordpressAdminApplication.this, "Binding service", Toast.LENGTH_LONG).show();
        // Intent intent = new Intent(this, WordpressService.class);
        // bindService(intent, this.serviceConnection, Context.BIND_AUTO_CREATE);// ServiceConnection,
        // startService(intent);
    }

    //
    // public WordpressService getWordpressService() {
    // return this.serviceConnection.getWordpressService();
    // }

    @Override
    public void onTerminate() {
        super.onTerminate();
        // Toast.makeText(WordpressAdminApplication.this, "Unbinding service", Toast.LENGTH_LONG).show();
        // unbindService(this.serviceConnection);
    }

}
